<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>MoTDStats
README/INFO File</title> </head>
<body><h3>What Is It?</h3>
MoTDStats is a Perl script, intended to be installed system-wide, and
the output incorporated into a Message of the Day. It can also be used
standalone as either the MoTD script for a certain user, or for all
users (you'll have to configure that yourself, though). <br />
Curently, it prints the following: Username of the current user, the
current date and time, kernel/OS type and architecture, amount of free
disk space on installed hard disks.<span style="font-weight: bold;"><br /></span><hr style="width: 100%; height: 2px;" /><h3>Configuration</h3>
The script should Just Work, with minimum changes required. At the
very minimum, the path to the Perl interpreter may need changing for
your platform.<br />
MoTDStats also has a number of other options you can/must set
(depending on your platform): <br />
<b>my</b> <font color="maroon">$ColourPrinting</font>
<br /><b>my</b> <font color="maroon">$DFPlatform</font>
<br /><br /><font color="maroon">$ColourPrinting</font>
can be set to either <b>1</b> to enable printing a blue
banner behind the date and time info (the default), or <b>0</b>,
to disable the banner. Even if you choose to disable this, you will
need Term::ANSIColor installed, or to use Perl 5.6.0 or later.<br /> <br />
<font color="maroon">$DFPlatform</font> can be set
to <font color="red">"Autodetect"</font> (the
default), which works on most platforms using the GNU utilities, or a
compatible df utility.<br />
On some platforms, this may need changing (e.g. on QNX or Minix), only
the Autodetect setting is currently implemented, though, until I can
get round to adding options for other platforms that need them. On AIX, set this to <font color="red">"AIX"<span style="color: rgb(0, 0, 0);">, naturally.</span> </font><br /><br />On QNX or SCO OpenServer, you can use the new <font color="red">"POSIX"</font>&nbsp;setting,
or if you're using a platform with a non-standard 'df' that doesn't
accept any additional options at all, there's the other new setting - <font color="red">"Generic"</font>.<br /><br />Nothing else should be changed in the script, unless you
have a good
reason for it.<br />
<hr style="width: 100%; height: 2px;" /><h3>History</h3>
The first version was quickly hacked up in a few hours as a proof of
concept/quick and dirty toy, and consisted of a number of kludges, bad
design decisions/code, and was a sprawling mass of code for each
platform type and disk node type. <br /> The early version was
cleaned up and slightly corrected by Sjors Gielen (thanks!), and later
had much of the platform specific code (spanning 4 'if' statements)
replaced by the current "autodetection" code by myself. <br />
You
can find the source code for the initial version in a PasteBin
somewhere (won't say where, though), you probably wouldn't want the
preliminary code. ;). <br /> <br />
Version 0.0.0a is the Initial Public Release. Brought to you by voodoo,
nested if statements, endless hours of annoying, accidental NX session
kills, and the want to do something whilst bored... <br /> <br />
Version 0.0.0b has few changes from the Initial Public Release, except
some hacks to make it print the amount of free disk space on the QNX
Neutrino RTOS (might also work on QNX4, but it hasn't been tested). On
a "trial balloon" basis, the username is now obtained from $LOGNAME,
instead of $USER, since it seems to be more portable (tested on Linux,
FreeBSD and QNX, may (not) work work on other platforms).
<br /> It also comes with this prettier, more colourful version
of
the INFO file generated from the original text file by hand; in KWrite
(no fancy WYSIWYG tools, here).
<p>Version 0.0.0c removes the need to use the horrible&nbsp;<font color="maroon">$DFNode</font> stuff (now replaced with
a nice egrep string that'll display multiple types of device nodes if
you have them), gets rid of the horrid '(if "<font color="maroon">$Auto</font>"=="<font color="maroon">$Auto</font>")' part (which wasn't
needed), and brings a slightly nicer INFO file, standards wise.</p><p>Version
0.0.0d cleans up some big issues with the code formatting, adds the
ability to optionally change the string printed before the uname, now
gets the username from the environment properly (tries $USER and
$LOGNAME, probably fails if neither are available), adds a few more
disk node types. KompoZer (unofficial version of Nvu) is now handling
this INFO file, and ensuring it stays relatively standards
compliant.&nbsp;</p><p>Version
0.0.0e contains a very tiny change so it Just Works on Cygwin, adds a
new feature (add
Fortune(); underneath UserDate(); at the bottom of the script, if you
want to use it), after discovering that all versions of Perl after, and
including 5.6.0 ship with Term::ANSIColor included, Big Issue 1 has
been solved! There's also some untested level of support for IBM AIX
(based on info from an IBM manpage).</p><p>Version 0.0.0f adds some minor changes to make MoTDStats work on Windows (both with and without Cygwin).</p>Version
0.0.0g adds SGI IRIX and SCO OpenServer device nodes, removes the QNX
platform option (was almost identical to the planned OpenServer one in
implementation) and replaces it with the <font color="red">"POSIX</font><font color="red">"</font> platform option. A new&nbsp;<font color="red">"Generic</font><font color="red">"</font>&nbsp;platform
has also been added to cope with non-standard tools like the df one in
BeOS, or for those who like raw, untreated df output.<br /><hr style="width: 100%; height: 2px;" /><h3>Platform-Specific Notes</h3><p> If you really want to run it on Windows natively, you'll need the CoreUtils, SharUtils and grep packages from the <a href="http://gnuwin32.sourceforge.net">GnuWin32</a> project,
as well as a copy of ActivePerl (might also work with the official
port, but I have not tested). You will need to add C:\Program
Files\GnuWin32\bin to the Path environment variable, to make it work.
It seems that&nbsp; <font color="maroon">$ColourPrinting</font> must be set to <span style="font-weight: bold;">0 </span>for this to work (or else you get garbage printed to the shell).</p><p> However, it Just Works on Cygwin (as it also does on Linux, and pretty much every other platform I've tested&nbsp;<br />on).</p><hr style="width: 100%; height: 2px;" />
<h3>Bugs/Big Issues</h3>No big issues/bugs at the moment (the biggest
one was solved for users of Perl 5.6.0+ (nearly everyone using Perl, as
far as I know) simply by not bothering to hack around not having it on
earlier versions).<br /><hr style="width: 100%; height: 2px;" /><h3>Licensing</h3>
This script is made available under the MIT License, a copy of which is
contained in this section. <br /> <br />
Copyright (c) 2007 Tyson Key, Sjors Gielen, Anyone else who wishes to
contribute <br />
Permission is hereby granted, free of charge, to any person <br />
obtaining a copy of this software and associated documentation <br />
files (the "Software"), to deal in the Software without <br />
restriction, including without limitation the rights to use, <br />
copy, modify, merge, publish, distribute, sublicense, and/or sell <br />
copies of the Software, and to permit persons to whom the <br />
Software is furnished to do so, subject to the following <br />
conditions: <br />
The above copyright notice and this permission notice shall be <br />
included in all copies or substantial portions of the Software. <br />
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, <br />
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES <br />
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND <br />
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT <br />
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, <br />
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING <br />
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR <br />
OTHER DEALINGS IN THE SOFTWARE. </body>
</html>